package com.education.platform.api.service.impl;

import com.education.platform.dao.entity.UserCountDO;
import org.springframework.beans.factory.annotation.Autowired;
import com.education.platform.common.service.impl.BaseServiceImpl;
import com.education.platform.dao.UserCountDao;
import org.springframework.stereotype.Service;
import com.education.platform.api.service.UserCountService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* describe: 
* @author : 
* @date: 2020-08-17 11:20:35.231
**/
@Service
public class UserCountServiceImpl extends BaseServiceImpl<UserCountDao,UserCountDO> implements UserCountService {

	private static final Logger LOGGER = LoggerFactory.getLogger(UserCountServiceImpl.class);

    @Autowired
	private UserCountDao userCountDao;


    /**
     * 更新学习时间
     *
     * @param userCountDO
     * @return
     */
    @Override
    public Boolean updateLearnTime(UserCountDO userCountDO) {
        return userCountDao.updateLearnTime(userCountDO)==1;
    }

    /**
     * 初始化今日学习时间
     *
     * @return
     */
    @Override
    public int initTodayLearnTime() {
        return userCountDao.initTodayLearnTime();
    }
}
